#ifndef BLOOM_H
#define BLOOM_H

#include <QWidget>
//#include "ui_Bloom.h"
#include "RGBEffect.h"
//#include "EffectRegisterer.h"
//#include "hsv.h"
#include "Curve/hsv.h"

namespace Ui {
class Bloom;
}

struct Flower {
    hsv_t hsv;
    float hue;
    float speed_mult = 1.f;
};

class Bloom : public RGBEffect
{

public:
    Bloom();
    ~Bloom();

    //EFFECT_REGISTERER(ClassName(), CAT_RANDOM, [](){return new Bloom;});

    static std::string const ClassName() {return "Bloom";}
    //void DefineExtraOptions(QLayout*) override;
    void StepEffect(ControllerZone* const controller_zone) override;
    void OnControllerZonesListChanged(ControllerZone* const controller_zone) override;

private:
    Ui::Bloom *ui;
    std::vector<std::vector<Flower>> flowers;

    void Reset(ControllerZone* const controller_zone);

    void UpdateFlowers(unsigned int);
};


#endif // BLOOM_H
